﻿




using System.Web.Mvc;
using Hotpot.ViewModels;

namespace Hotpot.Filters
{
    public class EnsureModelExceptionFilter : IExceptionFilter
    {
        #region IExceptionFilter Members

        public void OnException(ExceptionContext filterContext)
        {
            OxiteViewModel model = filterContext.Controller.ViewData.Model as OxiteViewModel;

            filterContext.Controller.ViewData.Model = new ExceptionOxiteViewModel(model, null);
        }

        #endregion
    }
}
